package org.example.code.logger;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//日志级别
@RestController
public class LoggerDome1 {
    @RequestMapping("logger1")
    public String  logger1(){
        Logger logger = LoggerFactory.getLogger("程序员001");
        //只会显示info之前的

        logger.error("=========error级别=======");
        logger.warn("=========warn级别=======");
        logger.info("=========info级别=======");
        logger.debug("=========debug级别=======");
        logger.trace("=========trace级别=======");
        return "一切正常";
    }
/*

    如果需要显示其他的日志级别，需要在配置文件中进行操作

*/

}
